#ifndef SDLBUTTON_H
#define SDLBUTTON_H
#pragma warning( disable : 4290 )

class sdlbutton_error : public std::logic_error 
{
public:
	sdlbutton_error(const std::string &error) : logic_error(error) { }
};

class SDLButton
{
private:
       struct SDL_Surface *button_unclicked_;
       struct SDL_Surface *button_clicked_;
       struct SDL_Surface *text_surface_;
       struct SDL_Rect dst_;
       struct SDL_Rect text_dst_;
       struct SDL_Surface *screen_;
       bool clicked_;
       typedef struct _TTF_Font *button_font_;
       struct SDL_Color button_text_color_;
public:       
       SDLButton(std::string unclicked, std::string clicked, int x, int y, struct SDL_Surface *dst_screen, class SDLText *buttontext) throw(sdlbutton_error);
       ~SDLButton();

       bool is_clicked(int x, int y);
       void render();
	      
};
#endif